package frog.lazy.framework.core.mybatis;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import tk.mybatis.mapper.annotation.LogicDelete;

import javax.persistence.*;
import java.time.LocalDateTime;

@Data
@SuperBuilder
@NoArgsConstructor
@MappedSuperclass
public class ExtendPO extends BasePO {

    /**
     * 创建时间
     */
    @Column(name = "created", updatable = false)
    private LocalDateTime created;

    /**
     * 创建者默认为SYS系统
     */
    @Column(name = "creator", updatable = false)
    private String creator;

    /**
     * 更新时间
     */
    @Column(name = "updated")
    private LocalDateTime updated;

    /**
     * 更新人
     */
    @Column(name = "updater")
    private String updater;

    /**
     * 删除
     */
    @LogicDelete
    @Column(name = "deleted")
    private Integer deleted;

}
